<!DOCTYPE html>
<html lang="en">
	<head>
	    <meta charset="UTF-8">
	    <script type="text/javascript" src="../assets/js/vue.js" ></script>
	    <title>mixins</title>
	</head>
	<body>
		<h1>mixins</h1>
		<div id="app">
			{{price}}
			<p><button @click="add">增加</button></p>
			<p><button @click="min">减少</button></p>
		</div>
	</body>
	
	<script type="application/javascript">
	
		var addConsole={
			updated:function(){
				console.log("11111111111111")
			}
		}
	
		var app = new Vue({
			el:'#app',
			data:{
				price:1
			},
			methods:{
				add:function(){
					this.price++;
				},
				min:function(){
					this.price--;
				}
			},
			mixins:[addConsole]
		})
	</script>
</html>